#ifndef FILEBUFFER_H
#define FILEBUFFER_H

enum SeekMode
{
    SM_BEGIN,
    SM_CURRENT,
    SM_END
};

class CStreamBuffer
{
    public:
        CStreamBuffer( void );
        ~CStreamBuffer( void );

        int Create( int length );
        int Create( void );

        int Write( const char* data );
        int Seek( SeekMode mode );
        int Printf( const char* data, ... );

        void Destroy( void );

        //
        //  ACCESSORS AND MUTATORS
        //

    private:
        char*   m_pBuffer;      // pointer to stream data
        int     m_Offset;
        int     m_Length;
        char*   m_pCurrentPos;  // current write position

const   int     m_MaxSize;
};

#endif // FILEBUFFER_H
